package com.br.negocio.vo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name = "contapagar")
@SequenceGenerator(name = "contapagar_seq", sequenceName = "contapagar_cod_contapagar_seq", allocationSize = 1)
@NamedQueries ({
	@NamedQuery(name = "loadAllContaPagar", query = "from ContaPagarVO"),
	@NamedQuery(name = "findContaPagar", query = "from ContaPagarVO as e where e.codigo = :codigo"),
})
public class ContaPagarVO implements Serializable {
	
	public static final String AGUARDANDO 		= "1";
	public static final String CONCLUIDO	 	= "2";

	private static final long serialVersionUID = 1L;
	
	@Id
	@Column(name = "cod_contarpagar")
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "contapagar_seq")
	private int codigo;

	@Temporal(TemporalType.TIMESTAMP)
	@Column (name = "data_criacao")
	private Date dataCriacao;
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column (name = "data_alteracao")
	private Date dataAlteracao;
	
	
	public ContaPagarVO() {

	}
	
	public ContaPagarVO(int codigo) {
		this.codigo = codigo;
	}

	public int getCodigo() {
		return this.codigo;
	}

	public void setCodigo(int codigo) {
		this.codigo = codigo;
	}

	public void setDataAlteracao(Date dataAlteracao) {
		this.dataAlteracao = dataAlteracao;
	}

	public Date getDataAlteracao() {
		return dataAlteracao;
	}

	public void setDataCriacao(Date dataCriacao) {
		this.dataCriacao = dataCriacao;
	}

	public Date getDataCriacao() {
		return dataCriacao;
	}
	
	/**
	 * @return the aguardando
	 */
	public static String getAguardando() {
		return AGUARDANDO;
	}

	/**
	 * @return the concluido
	 */
	public static String getConcluido() {
		return CONCLUIDO;
	}
}